package com.woorigil.social.parser;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public class EtcCategoryUtils {
	public static Map<Integer, List<String>> etcLocals = new HashMap<Integer, List<String>>() {{
		put(28, Arrays.asList("컬쳐 > 전시/체험/영화", "서울/수도권"));	//서울/경기
		put(29, Arrays.asList("다른지역"));	//다른지역
		put(30, Arrays.asList("영화/스포츠"));	//영화/스포츠
		put(31, Arrays.asList("여행/공연>공연/전시", "컬쳐 > 아동/가족"));	//체험/전시/아동
		put(32, Arrays.asList("뮤지컬"));	//뮤지컬/연극
		put(33, Arrays.asList("콘서트"));	//콘서트/클래식
		
		put(35, Arrays.asList("해외여행"));	//해외
		put(36, Arrays.asList("국내여행상품"));	//국내
		put(37, Arrays.asList("제주"));	//제주
		put(38, Arrays.asList("여행/공연>숙박"));	//숙박
		put(39, Arrays.asList("레저"));	//레저,스포츠 여행/공연>숙박/렌터카/항공>
	}};
	
	public static int getCategoryId(String category) {
		for (Entry<Integer, List<String>> entry : etcLocals.entrySet()) {
			for (String keyword : entry.getValue()) {
				if (category != null && category.contains(keyword)) {
					return entry.getKey();
				}
			}
		}
		return 100;
	}
}
